<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
<!--
td {
	text-align: center;
}
-->
</style>
</head>

<body>
<?php
include_once("conn.php");
$id=$_REQUEST['id'];
$sql = "SELECT * FROM student WHERE `id` = '$id'";
$result=mysql_query($sql);
$row = mysql_fetch_row($result);
?>
<p>修改学生信息（带*号的可以修改）</p>
<table width="50%" border="1">
  <tr>
    <td><form id="form1" name="form1" method="post" action="domodify.php">
      <p>
        <label>姓名
          <input name="name" type="text" id="name" value="<?=$row[1]?>" readonly="readonly" />
        </label>
      </p>
      <label>学号
        <input name="id" type="text" id="id" value="<?=$row[0]?>" readonly="readonly" />
      </label>
      <p>
        <label>性别 (*)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          <input name="sex" type="radio" id="sex_0" value="0" <?php echo $row[3]==0? "checked=\"checked\"":""?> />
          男</label>
        <label>
          <input type="radio" name="sex" value="1" id="sex_1" <?php echo $row[3]==1? "checked=\"checked\"":""?>/>
          女</label>
        <br />
      </p>
      <p>
        <label>学院
          <input name="dept" type="text" id="dept" value="<?=$row[4]?>" readonly="readonly" />
        </label>
      </p>
      <p>
        <label>专业
          <input name="major" type="text" id="major" value="<?=$row[5]?>" readonly="readonly" />
        </label>
      </p>
      <p>
        <label>出生年 (*)
          <input name="year" type="text" id="year" value="<?=$row[6]?>" />
        </label>
      </p>
      <p>
        <label>出生月 (*)
          <input name="month" type="text" id="month" value="<?=$row[7]?>" />
        </label>
      </p>
      <p>
        <label>
          <input type="submit" name="submit" id="submit" value="提交" />
        </label>
      </p>
    </form></td>
  </tr>
</table>
<?php
mysql_close($conn);
?>
</body>
</html>
